import Vue from 'vue'
import App from './App.vue'
import router from './router'
// import axios from 'axios'
import api from './api' // api interface
import './assets/css/iconfont/iconfont.css'
import VueVideoPlayer from 'vue-video-player'//视频播放组件
import 'video.js/dist/video-js.css'// require videojs style

import AudioVisual from 'vue-audio-visual'//可视化音频播放组件
// import WaveSurfer from 'wavesurfer.js'


import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import VueAudio from 'vue-audio-better'

Vue.use(VueAudio)

Vue.use(AudioVisual)
Vue.use(Element, {
  size: 'medium',
  zIndex: 3000
})

Vue.use(VueVideoPlayer, {
  options:{
    // videojs options
    muted: true,
    language: 'zh',
    playbackRates: [0.7, 1.0, 1.5, 2.0],
    sources: [{
      type: "video/mp4",
      src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
    }],
    // poster: "/static/images/author.jpg",
  } ,
  // events: global videojs events
}
)

Vue.config.productionTip = false;
// Vue.prototype.$axios = axios;
// Vue.prototype.$http = axios;
Vue.prototype.$api = api;
// axios.defaults.baseURL = '/api'//最主要的一句
// process.env.host = 'http://124.71.99.107:5000'

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')